package com.spark.quartz.entity;

import com.baomidou.mybatisplus.annotation.OrderBy;
import com.fasterxml.jackson.annotation.JsonFormat;
import com.baomidou.mybatisplus.annotation.TableName;
import com.spark.common.annotation.Dict;
import com.spark.common.annotation.query.Query;
import com.spark.common.annotation.valid.Password;
import com.spark.common.constants.QueryConstants;
import com.spark.common.constants.RegexConstants;
import com.spark.common.constants.validGroup.AddGroup;
import com.spark.common.constants.validGroup.EditGroup;
import com.spark.common.core.entity.BaseEntity;
import lombok.Data;
import lombok.EqualsAndHashCode;
import lombok.experimental.Accessors;
import org.springframework.format.annotation.DateTimeFormat;

import javax.validation.constraints.*;

/**
 * 定时任务日志
 *
 * @author LYCHEE
 * @date 2025/04/03 10:23
 */
@Data
@TableName("qrtz_job_log")
@Accessors(chain = true)
@EqualsAndHashCode(callSuper = true)
public class QrtzJobLog extends BaseEntity {

    /**
     * 任务名称
     */
    @Query(QueryConstants.QUERY_EQ)
    @NotBlank(message = "任务名称不能为空")
    @Dict(dictTable = "qrtz_job", dictCode = "id", dictText = "job_name")
    private java.lang.String jobId;

    /**
     * 调用目标字符串
     */
    private java.lang.String invokeTarget;

    /**
     * 日志信息
     */
    private java.lang.String jobMessage;

    /**
     * 执行状态
     *  : 0正常 1失败
     */
    @Query(QueryConstants.QUERY_EQ)
    @Dict(dictCode = "ok_fail")
    private java.lang.Integer status;

    /**
     * 异常信息
     */
    private java.lang.String exceptionInfo;

}
